﻿#define _CRT_SECURE_NO_WARNINGS

#include<stdlib.h>
#include<stdio.h>
#include<string.h>
#define MAX 100  

#define MAX_NAME 10
#define MAX_SEX 5
#define MAX_NUMBER 15
#define MAX_ADRESS 20

#define DEFALT_SZ 3
#define CAPACITY_SZ 2

typedef struct PoInFo
{
	char name[MAX_NAME];
	char sex[5];
	int age;
	char phone[MAX_NUMBER];
	char addr[MAX_ADRESS];

}PoInFo;

typedef struct contact
{
	PoInFo *data;
	int count;
	int capecity;
}contact;



void InitCon(contact* pc);

void LoadData(contact* pc);

void SaveContact(contact* pc);

void DestroyData(contact* pc);

int CheakCapacity(contact* pc);

void AddData(contact* pc);

void ShowCon(const contact* pc);

void SearchbyName(const contact* pc);

void DeleteDate(contact* pc);

void DeleteALL(contact* pc);

void SortbyName(contact* pc);

void ModifybyName(const contact* pc);